home *** CD-ROM | disk | FTP | other *** search
/ Loadstar 47 / 047.d81 / mathers of unive (.txt) < prev    next >
Encoding:
Commodore BASIC  |  1988-01-01  |  7.9 KB  |  214 lines

  1. 5 ifa=.thena=1:load"mathers.spr",8,1
  2. 10 poke53248+21,.
  3. 15 poke55,.:poke56,48:clr
  4. 20 gosub30:print"[147]":pokev,6:pokevb,6:goto50
  5. 30 o$=" ":t$="   ":l$="     ":p$=l$+"  "
  6. 35 j$=p$+"  ":q$=j$+"  ":s$=q$+"    "
  7. 40 v=53280:vb=v+1:k=1024:s=54272:c$="correct"
  8. 45 i$="incorrect":d$="":return
  9. 50 j=j+1:x=int(rnd(1)*999)+k:p=x+s:pokex,46:pokep,1:ifj<100then50
  10. 60 poke1149,81:poke1577,81:poke1692,81:poke55421,8:poke55849,5:poke55964,2
  11. 70 printd$"[152] [155]  [223][169]  [146][152][223][155]    [146][152][223][155]     [146][152][223][155] ";
  12. 75 print"[146][152][223] [155] [146][152][223][155]    [146][152][223][155]    [146][152][223]";
  13. 80 print"[155]    [146][152][223]"
  14. 90 print" [155] [146][223]  [146][169] [146]  [146]   [146]    [146]   ";
  15. 95 print" [146]   [146]  [146]     [146]   [146]  [146]   [152][167]"
  16. 100 print" [155] [146] [223][169]  [146]     [146]  [152] [155] [146]  [152] [155]    [146]    [146]     [146][169]     [152][146][167]"
  17. 110 print" [155] [146]   [152][169][155] [146]  [146]   [146]  [152] [155] [146]  ";
  18. 115 print"[152] [155] [146]   [146]  [146]     [146] [223][223][146]     [152][146][167]"
  19. 120 print" [155] [146]  [152][223] [155] [146]  [146]   [146]  [152] [155] [146]  [152] ";
  20. 125 print"[155] [146]   [146]     [146]  [146]   [146]     [152][146][167]"
  21. 130 print"[163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][155]"
  22. 140 print"[155]"s$"[157]o f   t h e"
  23. 150 print"   [146]  [146]   [223] [146]   [146] [223][223][169][146][169]  [192][192][146]   [192] [146]   [192][192][146]   [192][192][146]"
  24. 160 print"     [146]   [146][223] [146]   [146]  [223][169]   [192][192][146]   [146] [188][146]  [192][192] [146]   [192][192][146]":poke198,.
  25. 170 x=int(rnd(1)*990)+k:z=peek(x):ifz<>32orx>1263andx<1464then170
  26. 175 geta$:ifa$<>""then200
  27. 180 j=x+s:pokex,46:pokej,1:forp=1to50:next
  28. 185 pokej,6:pokex,32:forp=1to100:next
  29. 190 ifm<30thenm=m+1:goto170
  30. 200 pokev,0:pokevb,0:print"[147] t r a i n i n g   m i s s i o n  xxvii"
  31. 210 print"you are about to undergo a trial run  in"
  32. 220 print"the space pilot training  program.  your"
  33. 230 print"mission is to  make a successful landing"
  34. 240 print"on a nearby asteroid.to do this you must"
  35. 250 print"accurately calculate the correct  pounds"
  36. 260 print"of fuel needed to fire the main rockets."
  37. 270 print"if your calculations are inaccurate, the"
  38. 280 print"rockets will not fire, fuel will be lost"
  39. 290 print"and gravity will pull on the ship (spend"
  40. 300 print"all  your  fuel and your ship will crash"
  41. 310 print"on the launching platform)....good luck!"
  42. 320 printj$"press any key to begin";
  43. 330 getf$:iff$=""then330
  44. 340 print"[147]":gosub30:j=24:jj=226:m=247
  45. 345 dimhf(18),hh(18),lf(18),ll(18),dr(18)
  46. 350 fori=1to18:readhf(i),hh(i),lf(i),ll(i),dr(i):next
  47. 355 fori=1to4:readqc(i):next
  48. 360 fori=1to7:readrd(i),rp(i),rr(i),rn(i):next:pl=-1:kf=183
  49. 370 print"[147]","  pick a level!",,"     level"l$;
  50. 375 print" most difficult problem"
  51. 380 print"1) beginner i"q$"  5*5",,"2) beginner ii"q$" 9*5"
  52. 390 print"3) beginner iii"q$"9*9",,"4) junior i"s$"40*9"
  53. 400 print"5) junior ii"s$"[157]100*9","6) advanced"s$"100*99"
  54. 410 print"7) senior"s$"  1000*999",
  55. 415 print"8) to change and set the second number"
  56. 416 print"9) exit"
  57. 430 print" multiply numbers for highest dividend";:poke198,0
  58. 440 getb$:a=val(b$):ifa<1ora>9then440
  59. 445 ifa=9then60000
  60. 450 h=7:ifa=8then1200
  61. 460 print"[147]"d$j$"select a category!":print,"1) addition"
  62. 470 print,"2) subtraction":print,"3) multiplication"
  63. 475 print,"4) division"
  64. 480 print,"5) combination 1 & 2":print,"6) combination 3 & 4":poke198,0
  65. 490 geta$:b=val(a$):ifb<1orb>6then490
  66. 500 gosub1750:x=(rnd(1)*ti):ifa>6orpl>99thenh=6
  67. 510 print"[147]":pokev,7:g=53265:pokeg,peek(g)and239:ifb=5orb=6thenco=b-3
  68. 520 x=int(rnd(1)*986)+1037:ifx>1183andx<1224then520
  69. 530 ifx>1263andx<1304then520
  70. 540 p=x+s:z=z+1:pokex,46:pokep,1:ifz<61then520
  71. 550 print:printd$d$d$d$d$" e"j$"fuel"j$"[157]f":ifb=4thenrt=1
  72. 560 print"                         [146] .   [152][164][175][185][185][185][175][164]";
  73. 570 vc=13*4096:pokevc+21,49:pokevc+29,112:poke2040,192:poke2041,193
  74. 580 poke2042,194:poke2043,195:poke2044,196:poke2045,197:poke2046,198
  75. 590 pokevc+16,95:pokevc+0,j:pokevc+1,jj:pokevc+2,j:pokevc+3,m:pokevc+4,j
  76. 600 pokevc+5,m:pokevc+6,j:pokevc+7,m:pokevc+8,12:pokevc+9,50:pokevc+10,kf
  77. 610 pokevc+11,244:pokevc+12,12:pokevc+13,227:pokevc+39,11:pokevc+40,7
  78. 620 pokevc+41,2:pokevc+42,2:pokevc+43,3:pokevc+44,0:pokevc+45,11:pokev,5
  79. 630 pokev,0:pokevb,0
  80. 640 gosub1690:pokeg,peek(g)or16
  81. 650 y=-1:y$="":x=0:xx=0:t=t+1:ifcothengosub1080
  82. 660 gosub960:gosub1690:print"[151]enter answer-":print"press return":print
  83. 670 ifpl>-1thenxx=pl
  84. 680 ifrt>0orco=4then1090
  85. 690 gosub790:f=x:gosub710:gosub720:printt$" "x:f=xx:gosub710:gosub720
  86. 700 gosub750:gosub710:printspc(h)"[192][192][192][192]":gosub710
  87. 705 f=n:gosub720:gosub970:goto810
  88. 710 print:print"[145]";:return
  89. 720 printt$;:iff<10thenprinto$;
  90. 730 nx=99:fori=1to4:iff>nxthenprint"[157]";:nx=nx*10+9
  91. 740 next:return
  92. 750 printt$;:ifb=1thenprint"+"xx:n=x+xx
  93. 760 ifb=2thenprint"-"xx:n=x-xx
  94. 770 ifb=3thenprint"x"xx:n=x*xx
  95. 780 return
  96. 790 ifxx>xthenzx=x:x=xx:xx=zx
  97. 800 return
  98. 810 kf=kf-4:ifkf<9thenkf=9
  99. 820 pokevc+10,kf:ify<>nthenwr=wr+1:goto920
  100. 830 print""c$"!":ri=ri+1:jj=jj-7:m=jj+21:pokes+3,1:pokes+6,249
  101. 840 pokes+1,6:pokes+4,129:pokevc+21,57
  102. 850 tp=tp+1:forp=1to55:next:pokevc+21,61:iftp=11then880
  103. 860 forp=1to55:next:pokevc+21,59:iftp=13then890
  104. 870 goto850
  105. 880 pokevc+1,jj:pokevc+3,m:pokevc+5,m:pokevc+7,m:goto850
  106. 890 pokes+4,0:pokevc+21,49
  107. 895 ifjj<41thengosub1690:gosub1040:print"[158]":goto1650
  108. 900 ifkf=9then1580
  109. 910 tp=0:forp=1to500:next:goto650
  110. 920 print"sorry....":print"the total is":print"[156]"spc(8)n
  111. 925 ifkf=9then1580
  112. 930 if(ri>.)thenjj=jj+10:m=jj+21:ifjj>225thenjj=226:goto1620
  113. 940 pokevc+1,jj:pokevc+3,m:pokevc+5,m:pokevc+7,m:gosub1660
  114. 945 forp=1to10:pokes,lf
  115. 950 pokes+1,hf:pokes+4,33:lf=lf-1:hf=hf-1:next
  116. 955 pokes+4,0:forp=1toz:next:goto910
  117. 960 x=int(rnd(1)*rd(a))+rp(a):xx=int(rnd(1)*rr(a))+rn(a):return
  118. 970 y$="":poke198,0:ifa=8thenprint"? ";:goto990
  119. 980 printt$"? [144]";
  120. 990 wait198,15:getz$:z=asc(z$):ifz>47andz<59theny$=y$+z$:print""z$;
  121. 1000 zl=len(y$):ifzl>6thenz=20:goto1020
  122. 1010 ifz=13andzltheny=val(y$):printo$:return
  123. 1020 ifz=20andzltheny$=left$(y$,zl-1):print"[144][157] [146][157]";
  124. 1030 goto990
  125. 1040 ift<2then1070
  126. 1050 printt$"[152]out of":print""t"[152]problems":printt$"you had"
  127. 1060 print""ri"[152]"c$" and":print""wr"[152]"i$:printt$"answers!":return
  128. 1070 printd$"[152]you never got",,,"off the ground!",,,"what happened??"
  129. 1075 return
  130. 1080 i=co:co=qc(i):b=qc(i):return
  131. 1090 ifxx=0thenxx=int(rnd(1)*5)+1
  132. 1100 f=xx:print"":gosub1130:iff>9thenprinto$;:iff>99thenprinto$;
  133. 1110 printt$"[213][192][192][192][192][192][192][192]":gosub1130:f=x*xx:printxx"[221]"f:print:print"[157][157][145][145][145][145]"
  134. 1120 gosub1160:printt$;:gosub970:n=x:print"":goto810
  135. 1130 print"  ";:iff<10thenprinto$;
  136. 1140 iff>99thenprint"[157]";:iff>999thenprint"[157]";
  137. 1150 return
  138. 1160 iff<10thenreturn
  139. 1170 xy=len(str$(f)):l=len(str$(x)):ifxy=lthenreturn
  140. 1180 fori=1to3:ifl+(i)<=xythenprinto$;
  141. 1190 next:return
  142. 1200 print"[147] enter the number (from 0 to 999) which",t$
  143. 1205 print"you wish to ";
  144. 1210 print"appear in the problems",
  145. 1215 print"  a zero in problems of division will"
  146. 1220 print"  produce a random number from 1 to 5",s$"[157][151]press return"
  147. 1230 print"number";:gosub970:pl=y:ifpl<0orpl>999then1200
  148. 1240 printl$" you have selected number"pl:forp=1to2000:next:goto370
  149. 1250 pokevc+21,0:pokeg,peek(g)and239:print"[147]"ri;c$s$" "wr;i$
  150. 1260 ifa<7andb<3orb=5then1340
  151. 1270 printd$l$"  you have met the requirements"
  152. 1280 printq$"to qualify you as"
  153. 1290 ifzs=1thenprint" a kite flyer!! you need more training.":goto1330
  154. 1300 ift<30thenprint"  a topnotch pilot! congratulations!!"
  155. 1310 ift>29andt<38thenprint"    a good pilot with high potential."
  156. 1320 ift>37thenprintp$"a co-pilot.  keep trying!!"
  157. 1330 print"":goto1510
  158. 1340 printspc(17)"[185][185][185][185][185][185]":m=3:y=15:x=10:k=-2:l=4:gosub1550
  159. 1345 m=3:y=10:x=20:k=-1
  160. 1350 l=2:gosub1550:m=1:y=7:x=26:k=0:l=0:gosub1570
  161. 1355 ifzsthengosub1550:goto1370
  162. 1360 printp$"      [146][169]"t$"[223]    [146][169]"t$"[223]      "
  163. 1370 printp$"      [146]"l$"[160]   [146]"l$"      "
  164. 1375 ift>29andt<38thengosub1550:goto1400
  165. 1380 ift>37andzs<>1thenprintp$"      [169][146]   [223]    [169][146]   [223]      ":goto1400
  166. 1390 printp$"      [169]   [223]    [169]   [223]      "
  167. 1400 gosub1550:ifzs<>1thengosub1550:goto1420
  168. 1410 printp$"[181]      [146]                  [182]":goto1450
  169. 1420 gosub1570:ift<38thenprintp$"        [146]         [146]        "
  170. 1430 ift<30thenprintj$"       [146]               ":goto1450
  171. 1440 ift<38thenprintj$"       [146]       [146]        "
  172. 1450 m=1:y=8:x=24:k=1:l=-2:ift>37andzs<>1thengosub1550
  173. 1460 ifzsthenm=2:gosub1550
  174. 1470 ift>37andzs<>1thengosub1550
  175. 1480 printj$"        "spc(6)"       ":ifzs<>1theny=11:x=18:gosub1550:goto1500
  176. 1490 printq$"      [181]    [182]  [146]    "
  177. 1500 m=2:y=13:x=14:k=2:l=-4:gosub1550:printspc(17)"[162][162][162][162][162][162]"
  178. 1510 pokeg,peek(g)or16:print""q$"play again?  (y/n)";
  179. 1520 geta$:ifa$="y"thenrun340
  180. 1530 ifa$="n"then60000
  181. 1540 goto1520
  182. 1550 forj=1tom:fori=1toy:print" ";:next:fori=1tox:print" ";:next:print
  183. 1560 y=y+k:x=x+l:next:return
  184. 1570 printp$"[181]                        [182]":return
  185. 1580 x=int((238-jj)/6):ifx<2thenpokevc+1,226:goto1620
  186. 1590 gosub1660:forp=1tox:pokes,lf:pokes+1,hf:pokes+4,33:ifjj=226thenp=x
  187. 1600 pokevc+1,jj:jj=jj+6:ifjj>226thenjj=226
  188. 1610 lf=lf-3:hf=hf-3:next:pokes+4,0
  189. 1620 pokevc+21,240:gosub1670:forp=1to9:pokes,15:pokes+1,hf:hf=hf-1:next
  190. 1630 pokes+24,0:forp=1to500:next:x=8:z=18:gosub1750:gosub1710:forp=1to500
  191. 1640 next:gosub1690:gosub1040:forp=1to2600:next:print"":zs=1:goto1250
  192. 1650 x=1:z=7:gosub1750:gosub1710:forp=1to2600:next:goto1250
  193. 1660 z=1200:lf=151:hf=170:pokes+5,30:pokes+6,7:return
  194. 1670 hf=9:forl=0to24:pokes+l,0:next:pokes+14,5:pokes+18,14:pokes+3,211
  195. 1680 pokes+24,136:pokes+6,221:pokes+4,129:return
  196. 1690 poke53280,2:print"";:prints$" [221]":fori=1to6:prints$" [221]":prints$" [221]":next
  197. 1700 prints$" [221]":print"[192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][189]":print"";:return
  198. 1710 pokes+5,30:pokes+6,7:pokes+12,30:pokes+13,7:pokes+24,15:fori=xtoz
  199. 1720 pokes+1,hf(i):pokes+8,hh(i):pokes,lf(i):pokes+7,ll(i):pokes+4,33
  200. 1730 pokes+11,33:forp=1todr(i):next:pokes+4,32:pokes+11,32:forp=1to50:next
  201. 1740 next:return
  202. 1750 forl=0to24:pokes+l,0:next:pokes+24,15:pokes,151:pokes+1,170:return
  203. 1760 data33,25,135,30,250,33,25,135,30,63,33,25,135,30,63,33,25,135,30,250
  204. 1770 data33,25,135,30,63,33,25,135,30,63
  205. 1775 data44,33,135,195,1150,8,6,97,71,750
  206. 1777 data8,6,97,71,375,8,6,97,71,190,8,6,97,71,750
  207. 1780 data9,5,247,152,375,9,5,104,152,190,9,5,104,152,190,8,6,97,71,375
  208. 1790 data8,5,97,152,375,7,6,233,71,470,8,6,97,71,1500,2,1,4,3,6,,6,,9,1
  209. 1800 data6,,9,1,10,,31,10,9,1,91,10,9,1,91
  210. 1805 data10,90,10,901,100,900,100,0
  211. 60000 open15,8,15,"r0:hello connect=hello connect":input#15,er:close15
  212. 60010 ifer<>63thenend
  213. 60020 load"hello connect",8
  214.